import {Component, OnInit, Input,ViewChild} from '@angular/core';
// import * as Highcharts from 'highcharts';

import {NavController, ActionSheetController, AlertController, NavParams} from 'ionic-angular';
import {DomSanitizer} from '@angular/platform-browser';
import _ from "lodash";
import {Common} from "../../../../providers/common";
import {IrpQjtPersonPage} from "../../panoramagram/person/person.component";
import {IrpHotStockHMoreService} from "./more.service";
import {IrpHotStockHomeDetailPage} from "../detail/detail.component";

@Component({
  selector: "page-irp-panoramagram-more",
  templateUrl: 'more.html',
  providers: [IrpHotStockHMoreService]
})
export class IrpHotStockHMorePage {
  datasList= [{changecapital: '41',growthRate:"25", managername: "万科A（000002）"}, {
    changecapital: '39',growthRate:"22",
    managername: "世纪星源（000005）"
  }, {changecapital: '38', growthRate:"15",managername: "东风汽车（600006）"}, {changecapital: '37',growthRate:"20", managername: "南京高科（600064）"}, {
    changecapital: '35',growthRate:"18",
    managername: "中国国贸（600007）"
  },
    {changecapital: '24',growthRate:"16", managername: "神州泰岳（300002）"}, {changecapital: '19',growthRate:"15", managername: "特锐德（300001）"}, {
      changecapital: '17',growthRate:"12",
      managername: "蓝焰控股（000968）"
    }, {changecapital: '16',growthRate:"10", managername: "包钢股份（600010）"}]

  constructor(public navCtrl: NavController,
              public IrpHotStockHMoreService: IrpHotStockHMoreService,
              public navParams: NavParams) {
    this.setDatasList();

  }
  setDatasList() {
    this.datasList=_.sortBy(this.datasList, 'growthRate');
    this.datasList = _.reverse(this.datasList);
  }

  goDetail(data) {
    // this.navCtrl.push(IrpHotStockHomeDetailPage, {item: data});
  }
}

